package com.koala.test;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.koala.dbUtils.PostgresAgent;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		PostgresAgent agent=new PostgresAgent("localhost", "5432", "postgres", "mdavid32", "test");
		
		agent.Conectar();
		
		agent.EjecutarSQL("select * from test");
		
		ResultSet res=agent.getRes();
		
		try {
			while(res.next())
				System.out.println(res.getString(1));
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		agent.CerrarConexion();
		agent.CerrarConexion();
		
	}
}
